home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_07
/
allison
/
addborl.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-02
|
720b
|
37 lines
LISTING 6 - Additional code to make Borland's <except.h> header
standard-conforming
// Standard exceptions (CDA, 4/21/94)
#define exception xmsg
#define alloc xalloc
#define what why
class logic : public exception
{
public:
logic(const string& msg) : exception(msg) {}
void raise() {throw *this;}
};
class domain : public logic
{
public:
domain(const string& msg) : logic(msg) {}
void raise() {throw *this;}
};
class runtime : public exception
{
public:
runtime(const string& msg) : exception(msg) {}
void raise() {throw *this;}
};
class range : public runtime
{
public:
range(const string & msg) : runtime(msg) {}
void raise() {throw *this;}
};